﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <title>Ping: Ping.h Source File</title>
    <link href="/Content/Help.css" rel="stylesheet" type="text/css" />
    <link href="/Content/css/tabs.css" rel="stylesheet" type="text/css" />
    <link href="/Content/css/doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div id="header">
        <img id="logo" alt="StateForge" src="/Content/Images/StateForgeLogo.png" />
        <div id="title">
            <h1>
                Examples using state machines generated by StateBuilderCpp
            </h1>
            <h3>
                Ping: Ping.h Source File
            </h3>
        </div>
        <div id="menucontainer">
            <ul id="menu">
                <li><a href="/">Home</a></li>
                <li><a href="/Home/Download">Downloads</a></li>
                <li><a href="/Help/state-machine-tools.aspx">Help</a></li>
                <li><a href="/Home/Faq">F.A.Q</a></li>
                <li><a href="/Home/About">Contact us</a></li>
            </ul>
        </div>
    </div>
<!-- Generated by Doxygen 1.7.4 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">Ping.h</div>  </div>
</div>
<div class="contents">
<a href="_ping_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef PING_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define PING_H</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;QtCore/QObject&gt;</span>
<a name="l00005"></a>00005 
<a name="l00006"></a>00006 <span class="keyword">class </span>PingContext; <span class="comment">// Generated class</span>
<a name="l00007"></a>00007 <span class="keyword">class </span><a class="code" href="class_udp_echo_client.html">UdpEchoClient</a>;
<a name="l00008"></a>00008 
<a name="l00009"></a><a class="code" href="class_ping.html">00009</a> <span class="keyword">class </span><a class="code" href="class_ping.html">Ping</a> : <span class="keyword">public</span> QObject
<a name="l00010"></a>00010 {
<a name="l00011"></a>00011     Q_OBJECT
<a name="l00012"></a>00012     
<a name="l00013"></a>00013 <span class="keyword">public</span>:
<a name="l00014"></a>00014     <a class="code" href="class_ping.html#af5927f79e7c2503e999e7a5b936ebc0e">Ping</a>();
<a name="l00015"></a>00015     <span class="keyword">virtual</span> <a class="code" href="class_ping.html#a3e621888861ea796d21647f7d631d388">~Ping</a>();
<a name="l00016"></a>00016 
<a name="l00017"></a><a class="code" href="class_ping.html#a576409bd48d91e10a14e4b2d7c287e4e">00017</a>     <span class="keywordtype">int</span> <a class="code" href="class_ping.html#a576409bd48d91e10a14e4b2d7c287e4e">getTx</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_ping.html#aeb12e44de6a353771f72035724a6db7b">m_iTx</a>;}
<a name="l00018"></a><a class="code" href="class_ping.html#a5c1bf53c791a498f3399d486e4336e17">00018</a>     <span class="keywordtype">int</span> <a class="code" href="class_ping.html#a5c1bf53c791a498f3399d486e4336e17">getCount</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_ping.html#a84c08315b8dcb45b5c9a70ede792e5de">m_iCount</a>;}
<a name="l00019"></a><a class="code" href="class_ping.html#acc6d6e76e27da2ffd551b63f56418f21">00019</a>     <span class="keywordtype">long</span> <a class="code" href="class_ping.html#acc6d6e76e27da2ffd551b63f56418f21">getTimeout</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_ping.html#ab1b5d9147d4f0302d9a92e3752c54753">m_lTimeout</a>;}
<a name="l00020"></a>00020     <span class="keywordtype">void</span> <a class="code" href="class_ping.html#aab6c4b6fdb9ae51a84f9c06a6fa555da">send</a>();
<a name="l00021"></a>00021     
<a name="l00022"></a>00022 <span class="keyword">public</span> slots:
<a name="l00023"></a>00023     <span class="keywordtype">void</span> <a class="code" href="class_ping.html#adf8e06c5e894d2f04e5a003af7fb1861">start</a>();
<a name="l00024"></a>00024     <span class="keywordtype">void</span> <a class="code" href="class_ping.html#a4a82187b6e77afd265c97a7d61d81be5">onReply</a>();
<a name="l00025"></a>00025   
<a name="l00026"></a>00026 <span class="keyword">private</span> slots:
<a name="l00027"></a>00027     <span class="keywordtype">void</span> <a class="code" href="class_ping.html#a8f51833ce898be6744faeebdb73c8c66">contextEnd</a>();
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="keyword">private</span>:
<a name="l00030"></a><a class="code" href="class_ping.html#a71b3e4c517fe1aa542f88d360a5a0b1c">00030</a>     PingContext *<a class="code" href="class_ping.html#a71b3e4c517fe1aa542f88d360a5a0b1c">m_pPingContext</a>; <span class="comment">// Generated class</span>
<a name="l00031"></a><a class="code" href="class_ping.html#a087366992f27a6fcfa44de07580e1367">00031</a>     <a class="code" href="class_udp_echo_client.html">UdpEchoClient</a> *<a class="code" href="class_ping.html#a087366992f27a6fcfa44de07580e1367">m_pUdpEchoClient</a>;
<a name="l00032"></a>00032     
<a name="l00033"></a><a class="code" href="class_ping.html#a452b351c5f040a88c4e857901260c062">00033</a>     <span class="keywordtype">int</span> <a class="code" href="class_ping.html#a452b351c5f040a88c4e857901260c062">m_iRx</a>; <span class="comment">// Number of packet received</span>
<a name="l00034"></a><a class="code" href="class_ping.html#aeb12e44de6a353771f72035724a6db7b">00034</a>     <span class="keywordtype">int</span> <a class="code" href="class_ping.html#aeb12e44de6a353771f72035724a6db7b">m_iTx</a>; <span class="comment">// Number of packet already sent</span>
<a name="l00035"></a><a class="code" href="class_ping.html#a84c08315b8dcb45b5c9a70ede792e5de">00035</a>     <span class="keywordtype">int</span> <a class="code" href="class_ping.html#a84c08315b8dcb45b5c9a70ede792e5de">m_iCount</a>; <span class="comment">//Total number of packet to send</span>
<a name="l00036"></a><a class="code" href="class_ping.html#ab1b5d9147d4f0302d9a92e3752c54753">00036</a>     <span class="keywordtype">long</span> <a class="code" href="class_ping.html#ab1b5d9147d4f0302d9a92e3752c54753">m_lTimeout</a>;<span class="comment">// Timeout in msec between 2 packets</span>
<a name="l00037"></a>00037     <span class="keywordtype">void</span> <a class="code" href="class_ping.html#add2b5072281b54697f29d2dee19c3727">logInit</a>();
<a name="l00038"></a>00038     <span class="keywordtype">void</span> <a class="code" href="class_ping.html#a10309b89388a484e25fecc7dcac75273">printStatistics</a>();
<a name="l00039"></a>00039 };
<a name="l00040"></a>00040 
<a name="l00041"></a>00041 <span class="preprocessor">#endif // TRAFFICLIGHT_H</span>
</pre></div></div>
</div>
﻿<div id="footer">
    <hr />
    <p>
        Copyright &copy; 2011 StateForge.</p>
    <hr />
</div>
</body> </html> 
